package com.usdt.system.dto.cp;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
//@Builder
public class ActivityCalendarDTO {
	
	
	//id")
    private Integer id;
	
	//是否同步活动库")
	private Boolean isSyn=false;
	
	//是否草稿")
	private Boolean isDraft=false;
	
	//活动模板id")
	private Integer activityTempId;

	//名称")
    private String name;
	
	//维度")
	private Integer activityCategory;
	
	//类别")
	private Integer activityType;
	
	//活动时长")
	private BigDecimal activityDuration;
	
	//活动时长单位")
	private Integer activityDurationUnit;
	
	//准备时长")
	private BigDecimal activityPreparationDuration;
	
	//准备时长单位")
	private Integer activityPreparationDurationUnit;
	
	//活动地点库id")
	private Integer activityAddressTempId;
	
	//活动地点")
	private String activityAddress;
	
	//人数限制")
	private BigDecimal activityPeopleLimited;
	
	//活动时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime activityTime;
	
	//材料/资源")
	private String activityResourc;
	
	//环境/场地")
	private String activityVenue;
	
	//负责人")
	private String activityWriter;
	
	private String activityProcessDescriptionJson;
	
	//注意事项")
	private String  activtyNotes;
	
	//适合人群")
	private String  activtyCrowd;
	
	//禁忌")
	private String  activtyTaboo;
	
	//积分")
	private Byte activtyPoints;
	
	
	//活动时间 yyyy-MM-dd
	private LocalDate localDate;
	
	//活动时间 yyyy-MM-dd
	private String localDateStr;
	
	// HH:mm
	private String time;
	
    // 使用预定义的格式 "yyyy-MM-dd HH:mm:ss"
    private DateTimeFormatter ft = DateTimeFormatter.ofPattern("yyyy-MM-dd");
    private DateTimeFormatter ftt = DateTimeFormatter.ofPattern("M月d日");
    private DateTimeFormatter fttt = DateTimeFormatter.ofPattern("HH:mm");
    
    public LocalDate getLocalDate(){
        return LocalDate.parse(activityTime.format(ft), ft);
    }
    
    public String getLocalDateStr(){
    	return activityTime.format(ft);
    }
    
    public String getTime(){
    	return activityTime.format(fttt);
    }
}
